package com.lexian.controller.back;

import com.lexian.utils.CommonResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 后台用户控制器
 */
@RestController
@RequestMapping("/userback")
public class UserBackController {

    //暂时模拟登录
    //后台登录
    @PostMapping("/login")
    public CommonResponse login(){
        return CommonResponse.ok().data("token","admin");
    }

    @GetMapping("/info")
    public CommonResponse info(){
        return CommonResponse.ok()
                .data("roles","[admin]")
                .data("name","admin")
                .data("avatar","https://zjx-2020.oss-cn-beijing.aliyuncs.com/2020/11/22/5cdd717f86604a9199fd520018c3b752file.png");
    }




}
